package cn.lingyangwl.agile.pay.common.service;

import cn.lingyangwl.agile.pay.model.rqrs.TransferOrderQL;
import cn.lingyangwl.agile.pay.model.entity.TransferOrder;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author shenguangyang
 */
public interface TransferOrderService extends IService<TransferOrder> {
    /**
     * 更新转账订单状态 转账订单生成 --> 转账中
     */
    boolean updateInit2Ing(String transferNo);

    /**
     * 更新转账订单状态  转账中 --> 转账成功
     */
    boolean updateIng2Success(String transferNo, String channelOrderNo);

    /**
     * 更新转账订单状态  转账中 --> 转账失败
     */
    boolean updateIng2Fail(String transferNo, String channelOrderNo, String channelErrCode, String channelErrMsg);

    /**
     * 更新转账订单状态  转账中 --> 转账成功/转账失败
     */
    boolean updateIng2SuccessOrFail(String transferNo, String updateStatus, String channelOrderNo, String channelErrCode, String channelErrMsg);

    /**
     * 查询商户订单
     */
    TransferOrder queryMchOrder(String mchNo, String mchOrderNo, String transferNo);

    IPage<TransferOrder> pageTransferOrder(TransferOrderQL query);
}
